package com.zjj.learn.javaplus.pkg06.demo604;

import java.io.FileWriter;
import java.io.IOException;

/**
 * 字符输出流，项文件中写数据
 **/
public class FileWriterTest1 {

    public static void main(String[] args) throws IOException {
        FileWriter writer = new FileWriter("fw.txt", true);

        //写出数据
        writer.write(98);
        writer.write("黑马程序员");

        //若不关闭资源，数据保存在内存中，不会刷新到磁盘
        writer.close();

    }
}
